package com.gurid.service.edu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gurid.service.base.model.BaseEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程
 * </p>
 *
 * @author Gurid
 * @since 2024-04-29
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("edu_course")
@Schema(name = "Course", description = "课程")
public class Course extends BaseEntity {

    private static final long serialVersionUID = 1L;

    public static final String COURSE_DRAFT = "Draft"; // 未发布，草稿
    public static final String COURSE_NORMAL = "Normal"; // 已发布

    @Schema(description = "课程讲师ID")
    private String teacherId;

    @Schema(description = "课程专业ID")
    private String subjectId;

    @Schema(description = "课程专业父级ID")
    private String subjectParentId;

    @Schema(description = "课程标题")
    private String title;

    @Schema(description = "课程销售价格，设置为0则可免费观看")
    private BigDecimal price;

    @Schema(description = "总课时")
    private Integer lessonNum;

    @Schema(description = "课程封面图片路径")
    private String cover;

    @Schema(description = "销售数量")
    private Long buyCount;

    @Schema(description = "浏览数量")
    private Long viewCount;

    @Schema(description = "乐观锁")
    private Long version;

    @Schema(description = "课程状态 Draft未发布  Normal已发布")
    private String status;
}
